package com.woniuxy.microsystemserver.controller;

import com.woniuxy.bean.ResultBean;
import com.woniuxy.microsystemserver.service.AppCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Auther: yeyang  <br/>
 * Date: 2021/4/20 0020:上午 11:00  <br/>
 * Description:
 */
@RefreshScope
@RestController
@Api(tags = "appcode")
@RequestMapping(value = "/appcode",produces = MediaType.APPLICATION_JSON_VALUE)
public class AppCodeController {
    @Resource
    private AppCodeService appCodeService;

    @GetMapping("/fund")
    @ApiOperation("修改fund阿里APPcode")
    public ResultBean updateFund(String key){
        return appCodeService.updateFund(key);
    }

    @GetMapping("/certification")
    @ApiOperation("修改certification的APPcode")
    public ResultBean updateCertification(String key){
        return appCodeService.updateCertification(key);
    }

    @GetMapping("/gold")
    @ApiOperation("修改certification的APPcode")
    public ResultBean updateGold(String key){
        return appCodeService.updateGold(key);
    }
}
